import * as React from 'react'
import './index.scss'
import {LoginReq} from '../../config/require'

export default class Login extends React.Component{

    render(){
        let username:any, password:any, checkbox:any;
        return (
            <div className="login">
                <h2>
                    <span className="line"> </span>
                    <span className="title">Đăng nhập</span>
                    <span className="line"> </span>
                </h2>

                <div className="inputs">
                    <input type="text" className="username"  ref={node => username=node}/>
                    <input type="password" className="password"  ref={node => password=node}/>
                    <label className="remember">
                        <input type="checkbox"  ref={node => checkbox=node}/>
                        <span>Lưu lại</span>
                    </label>
                    <a href="javascript:void(0);" className="forget" >Đăng ký</a>
                </div>

                <a href="javascript:void(0);" className="btn-login" onClick={()=>{LoginReq(username.value, password.value, checkbox.checked)}}>Đăng nhập</a>
                <a href="javascript:void(0);" className="btn-fb">FACEBOOK</a>
            </div>
        )
    }
}
